package com.css.zfzx.data.primary.base.division.service.Impl;

import com.css.zfzx.data.common.ProvinceCityAreaUtil;
import com.css.zfzx.data.primary.base.division.repository.BaseDivisionRepository;
import com.css.zfzx.data.primary.base.division.service.BaseDivisionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.PostConstruct;
import java.util.List;

@Service
public class BaseDivisionServiceImpl implements BaseDivisionService {
    @Autowired
    BaseDivisionRepository baseDivisionRepository;

    @PostConstruct
    public void init() {
        ProvinceCityAreaUtil.initProvinceCityArea(baseDivisionRepository.findAllDivison());
    }

    public List<String> findPioneerType1(){
        return baseDivisionRepository.findPioneerType1();
    }
}
